package com.twu.module1;

import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

public class PrinterExercisesTest {

    private final String EightAsterisks = "********";


    @Test
    public void shouldProduceStringOfOneAsterisk() {
        assertThat(PrinterExercises.printOneAsterisk(), is("*"));
    }

    @Test
    public void shouldPrintLineOfAsterisksLengthN() {
        int n = 8;
        assertThat(PrinterExercises.createLineWithSpecifiedNumberOfAsterisks(n), is(EightAsterisks));
    }

    @Test
    public void shouldCreateMultipleLinesOfHeightN() {
        String[] expected = {"*", "*", "*"};
        int n = 3;
        assertThat(PrinterExercises.printLines("*", n), is(expected));
    }

}


